<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
  <head>
     <title>秒杀列表页</title>
  	<%@include file="common/boots.jsp"%>
  </head>
  <body>
    <div class="container">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h1 style="text-align: center;">秒杀列表</h1>
        </div>
        <div class="panel-body">
          <table class="table table-hover">
            <thead>
              <th>名称</th>
              <th>库存</th>
              <th>开始时间</th>
              <th>结束时间</th>
              <th>创建时间</th>
              <th>商品详情</th>
            </thead>
            <tbody>
              <c:forEach var="sk" items="${list}">
                <tr>
                  <td>${sk.name}</td>
                  <td>${sk.number}</td>
                  <td>
                    <fmt:formatDate value="${sk.startTime}" pattern="yyy-MM-dd HH:mm:ss" />
                  </td>
                  <td>
                    <fmt:formatDate value="${sk.endTime}" pattern="yyy-MM-dd HH:mm:ss" />
                  </td>
                  <td>
                    <fmt:formatDate value="${sk.createTime}" pattern="yyy-MM-dd HH:mm:ss" />
                  </td>
                  <td>
                    <a class="btn btn-info" href="/seckill/${sk.seckillId}/detail" target="_blank">link</a>
                  </td>
                </tr>
              </c:forEach>
            </tbody>
          </table>
        </div>
      </div>
	   </div>

    <script src="<%=path%>/static/bootstrap-3.3.7-dist/js/jquery.min.js"></script>
    <script src="<%=path%>/static/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
  </body>
</html>